<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <t:base type="jquery,easyui,tools,DatePicker,ckeditor"></t:base>
    <link rel="stylesheet" href="${webRoot}/plug-in/lhgDialog/skins/blue.css"/>
    <link rel="stylesheet" href="${webRoot}/plug-in/lhgDialog/skins/default.css"/>
    <style>
        .viewimg{
            float: left;
            height: 100px;
            margin-right: 10px;
        }
        .uploadimg{
            float: left;
            min-width: 60px;
            padding: 0 10px;
            height: 30px;
            line-height: 30px;
            margin-top: 30px;
            background:#1964a0;
            color: #FFF;
            font-size:14px;
            text-align: center
        }
        .uploadimg:hover,.btnEditTag:hover{ color: #FFF;}
        .tags{
            display: inline-block;
            padding: 0 10px;
            line-height:28px;
            margin: 5px;
            border-radius: 3px;
            border:1px solid #DCDCDC;
        }
        .btnEditTag{
            display: inline-block;
            padding: 0 10px;
            margin: 5px;
            line-height:28px;
            background:#1964a0;
            color: #FFF;
            font-size:14px;
            text-align: center}
    </style>
    <script type="text/javascript" charset="utf-8" src="${webRoot}/plug-in/QQgeo/geo.js"></script>
</head>

<body scroll="no">
<t:formvalid formid="addformobj" dialog="true" usePlugin="password" layout="table"
             action="consultantController.do?saveorupdate" beforeSubmit="f_goodsDesc()">
    <%--callback="@Override noteSubmitCallback"--%>
    <input name="consultantId" type="hidden" value="${consultant.consultantId}">

    <div class="new_table_list">
        <table cellpadding="0" cellspacing="1" class="formtable" style="padding-left: 100px">
            <tbody>
            <tr>
                <td align="left" style="width: 100px">
                    <label class="Validform_label">
                        姓名:
                    </label>
                </td>
                <td class="txt_left value">
                        ${consultant.aCustomerEntity.realname}
                </td>
                <td align="left">
                    <label class="Validform_label">
                        性别:
                    </label>
                </td>
                <td class="txt_left value">
                    <t:dictSelect field="aCustomerEntity.sex" extendJson="{datatype:'*', disabled='disabled'}" typeGroupCode="sex"  defaultVal="${consultant.aCustomerEntity.sex}"  hasLabel="false" ></t:dictSelect>
                    <span class="Validform_checktip"></span>
                </td>
            </tr>

            <tr>
                <td align="left" style="width: 100px">
                    <label class="Validform_label">
                        身份证号:
                    </label>
                </td>
                <td class="txt_left value">
                        ${consultant.aCustomerEntity.certNumber}
                </td>
                <td align="left">
                    <label class="Validform_label">
                        所在地:
                    </label>
                </td>
                <td class="txt_left value">
                    ${consultant.aCustomerEntity.province}${consultant.aCustomerEntity.city}${consultant.aCustomerEntity.area}
                </td>
            </tr>

            <tr>
                <td align="left" style="width: 100px">
                    <label class="Validform_label">
                        出生日期:
                    </label>
                </td>
                <td class="txt_left value" >
                    <span id="birthday"></span>
                </td>
                <td align="left">
                    <label class="Validform_label">
                        学历:
                    </label>
                </td>
                <td class="txt_left value">
                    <t:dictSelect field="education" typeGroupCode="education"  defaultVal="${consultant.education}"   hasLabel="false"   extendJson="{datatype:'*',nullmsg:'请选择学历', disabled='disabled'}" ></t:dictSelect>
                    <span class="Validform_checktip"></span>
                </td>
            </tr>

            <tr>
                <td align="left" style="width: 100px">
                    <label class="Validform_label">
                        手机号码:
                    </label>
                </td>
                <td class="txt_left value">
                        ${consultant.aCustomerEntity.phone}
                </td>

                <td align="left" style="width: 100px">
                    <label class="Validform_label">
                        排序:
                    </label>
                </td>
                <td class="txt_left value">
                        ${consultant.sort}
                </td>
            </tr>


            <tr>
                <td align="left" style="width: 100px">
                    <label class="Validform_label">
                        头衔1:
                    </label>
                </td>
                <td class="txt_left value">
                        ${consultant.firstTitle}
                </td>

                <td align="left" style="width: 100px">
                    <label class="Validform_label">
                        头衔2:
                    </label>
                </td>
                <td class="txt_left value">
                        ${consultant.secondTitle}
                </td>
            </tr>

            <tr>
                <td align="left" style="width: 100px">
                    <label class="Validform_label">
                        头衔3:
                    </label>
                </td>
                <td class="txt_left value">
                        ${consultant.thirdTitle}
                </td>

            </tr>

            <tr>
                <td align="left">
                    <label class="Validform_label">
                        身份证正面:
                    </label>
                </td>
                <td class="txt_left value">
                    <img id="certImageThumbImg"
                         src='${webRoot}/${consultant.aCustomerEntity.certImage}'
                         class="viewimg" alt="预览" title="预览" width="200px;" height="100px;">
                </td>
                <td align="left">
                    <label class="Validform_label">
                        身份证反面:
                    </label>
                </td>
                <td class="txt_left value">
                    <img id="certImage2ThumbImg"
                         src='${webRoot}/${consultant.aCustomerEntity.certImage2}'
                         class="viewimg" alt="预览" title="预览" width="200px;" height="100px;">
                </td>
            </tr>

            <tr>
                <td align="left">
                    <label class="Validform_label">
                        头像:
                    </label>
                </td>
                <td class="txt_left value">
                    <img id="avatarThumbImg"
                         src='${webRoot}/${consultant.aCustomerEntity.avatar}'
                         class="viewimg" alt="预览" title="预览" width="100px;" height="100px;">
                </td>
                <td align="left">
                    <label class="Validform_label">
                        执行资格证:
                    </label>
                </td>
                <td class="txt_left value">
                    <img id="certThumbImg"
                         src='${webRoot}/${consultant.cert}'
                         class="viewimg" alt="预览" title="预览" width="200px;" height="100px;">
                </td>
            </tr>
            <tr>
                <td align="left" rowspan="3" valign="top">
                    <label class="Validform_label">
                        其他证件:
                    </label>
                </td>
                <td class="txt_left value">
                    <img id="auth1ThumbImg"
                         src='${webRoot}/${auth1==null?"upload/none.jpg":auth1}'
                         class="viewimg" alt="预览" title="预览" width="200px;" height="100px;">
                </td>
                <td align="left">
                    <label class="Validform_label">

                    </label>
                </td>
                <td class="txt_left value">
                    <img id="auth2ThumbImg"
                         src='${webRoot}/${auth2==null?"upload/none.jpg":auth2}'
                         class="viewimg" alt="预览" title="预览" width="200px;" height="100px;">
                </td>
            </tr>

            <tr>
                <td class="txt_left value">
                    <img id="auth3ThumbImg"
                         src='${webRoot}/${auth3==null?"upload/none.jpg":auth3}'
                         class="viewimg" alt="预览" title="预览" width="200px;" height="100px;">
                </td>
                <td align="left">
                    <label class="Validform_label">

                    </label>
                </td>
                <td class="txt_left value">
                    <img id="auth4ThumbImg"
                         src='${webRoot}/${auth4==null?"upload/none.jpg":auth4}'
                         class="viewimg" alt="预览" title="预览" width="200px;" height="100px;">
                </td>
            </tr>

            <tr>
                <td class="txt_left value">
                    <img id="auth5ThumbImg"
                         src='${webRoot}/${auth5==null?"upload/none.jpg":auth5}'
                         class="viewimg" alt="预览" title="预览" width="200px;" height="100px;">
                </td>
                <td colspan="3" align="left">
                    <label class="Validform_label">

                    </label>
                </td>
            </tr>

            <tr>
                <td align="left" valign="top">
                    <label class="Validform_label">
                        擅长领域:
                    </label>
                </td>
                <td colspan="3">
                    <div>
                        <span id="secondClassesTag">
                        <c:forEach items="${secondClassesTag}" var="t" varStatus="k">
                            <%-- <c:if test="${k.index !=0}">,</c:if>--%>
                            <span class="tags"> ${t.title}</span>
                        </c:forEach>
                        </span>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="left" colspan="1">
                    <label class="Validform_label">
                        简介:
                    </label>
                </td>
                <td class="value" colspan="3">
                        ${consultant.brief}
                </td>
            </tr>
        </table>
    </div>
</t:formvalid>
<script>
    $(function(){
        $("#birthday").html(formatD());//生日
    });

    /*
     *日期格式转换
     */
    function formatD(){
        var date =  '${consultant.aCustomerEntity.birthday}';
        if(date != ''){
            return formatDate(date);
        }else {
            return '';
        }
    }
    function formatDate(date) {
        var d = new Date(date),
            month = '' + (d.getMonth() + 1),
            day = '' + d.getDate(),
            year = d.getFullYear();

        if (month.length < 2) month = '0' + month;
        if (day.length < 2) day = '0' + day;

        return [year, month, day].join('-');
    }
</script>
</body>

</html>